package com.kun.leave.task;

import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;

import java.util.Map;


/**
 * @author fangkun
 * @create 2023-05-26-13:43
 */
public class ApproveServiceTask implements JavaDelegate {
    private static final Logger logger = LoggerFactory.getLogger(ApproveServiceTask.class);

    @Override
    public void execute(DelegateExecution delegateExecution) {
        Map<String, Object> variables = delegateExecution.getVariables();
        Object name = variables.get("name");
        Object days = variables.get("days");
        logger.info("{} 请假 {} 天的申请通过审批！",name,days);
    }
}
